home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 1_2002.ISO / Data / Zips / String Man2984110192001.psc / ReverseString / Form1.frm (.txt) next >
Encoding:
Visual Basic Form  |  2001-10-18  |  1.2 KB  |  43 lines

  1. VERSION 5.00
  2. Begin VB.Form Form1 
  3.    Caption         =   "Form1"
  4.    ClientHeight    =   1845
  5.    ClientLeft      =   60
  6.    ClientTop       =   345
  7.    ClientWidth     =   4590
  8.    LinkTopic       =   "Form1"
  9.    ScaleHeight     =   1845
  10.    ScaleWidth      =   4590
  11.    StartUpPosition =   3  'Windows Default
  12.    Begin VB.TextBox Text1 
  13.       Height          =   375
  14.       Left            =   120
  15.       TabIndex        =   0
  16.       Text            =   "Enter text to reverse"
  17.       Top             =   240
  18.       Width           =   4335
  19.    End
  20.    Begin VB.CommandButton Command1 
  21.       Caption         =   "&REVERSE"
  22.       Default         =   -1  'True
  23.       Height          =   615
  24.       Left            =   1080
  25.       TabIndex        =   1
  26.       Top             =   960
  27.       Width           =   1935
  28.    End
  29. Attribute VB_Name = "Form1"
  30. Attribute VB_GlobalNameSpace = False
  31. Attribute VB_Creatable = False
  32. Attribute VB_PredeclaredId = True
  33. Attribute VB_Exposed = False
  34. Function StringReverse(Str As String) As String
  35.     Dim i As Integer
  36.     For i = Len(Str) To 1 Step -1
  37.         StringReverse = StringReverse & Mid(Str, i, 1)
  38.     Next
  39. End Function
  40. Private Sub Command1_Click()
  41.     Text1 = StringReverse(Text1)
  42. End Sub
  43.